/* deck-builder.css */
body {
    background-image: url('https://images.unsplash.com/photo-1511512578047-dfb367046420?ixlib=rb-1.2.1&auto=format&fit=crop&w=1351&q=80');
}

.deck-header {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 20px;
    border-radius: 15px;
    margin-bottom: 30px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    gap: 20px;
}

.deck-name {
    font-size: 1.8em;
    font-weight: bold;
    color: #fff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    flex-grow: 1;
}

.edit-name {
    padding: 10px 20px;
    background: linear-gradient(135deg, #6a11cb 0%, #2575fc 100%);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.edit-name:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
    background: linear-gradient(135deg, #2575fc 0%, #6a11cb 100%);
}

.edit-name:active {
    transform: translateY(0);
}

.deck-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.card-section {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.section-title {
    font-weight: bold;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    font-size: 1.2em;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 50px;
    height: 2px;
    background: linear-gradient(90deg, #6a11cb, #2575fc);
}

.card-list {
    display: flex;
    flex-direction: row;
    min-height: 200px;
    border: 2px dashed rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    padding: 15px;
    transition: all 0.3s ease;
}

.card-list:hover {
    border-color: rgba(255, 255, 255, 0.5);
    background: rgba(255, 255, 255, 0.05);
}

.candidate-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 30px;
    margin-top: 30px;
}

.candidate-cards {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.candidate-title {
    font-weight: bold;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    font-size: 1.2em;
    position: relative;
}

.candidate-title::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 50px;
    height: 2px;
    background: linear-gradient(90deg, #6a11cb, #2575fc);
}

.candidate-scroll-container {
    overflow-x: scroll;
    overflow-y: hidden;
    padding-bottom: 15px;
}

.candidate-scroll-container::-webkit-scrollbar {
    height: 8px;
}

.candidate-scroll-container::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
}

.candidate-scroll-container::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #6a11cb, #2575fc);
    border-radius: 4px;
}

.candidate-list {
    display: flex;
    gap: 20px;
    padding: 5px;
    min-width: max-content;
}

.save-button {
    position: fixed;
    bottom: 30px;
    right: 30px;
    padding: 15px 30px;
    background: linear-gradient(135deg, #4caf50, #2e7d32);
    color: white;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    z-index: 10;
}

.save-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
    background: linear-gradient(135deg, #2e7d32, #4caf50);
}

.save-button:active {
    transform: translateY(0);
}

.delete-button {
    position: fixed;
    bottom: 100px;
    right: 30px;
    padding: 15px 30px;
    background: linear-gradient(135deg, #4caf50, #2e7d32);
    color: white;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    z-index: 10;
}

.delete-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
    background: linear-gradient(135deg, #2e7d32, #4caf50);
}

.delete-button:active {
    transform: translateY(0);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .header {
        padding: 10px 15px;
    }

    .container {
        padding: 80px 15px 70px;
    }

    .deck-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .deck-name {
        font-size: 1.5em;
    }

    .edit-name, .back-button, .save-button {
        padding: 10px 20px;
        font-size: 14px;
    }

    .candidate-section {
        grid-template-columns: 1fr;
    }
}

/* 卡牌样式 */
.card {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 12px;
    width: 120px; /* 根据图片尺寸调整 */
    height: 200px; /* 根据图片尺寸调整 */
    transition: all 0.3s ease;
    overflow: visible;
    position: relative;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    flex-shrink: 0;
    cursor: pointer;
    border-radius: 10%;
    margin-right: -30px; 
}

.card:hover {
    z-index: 100;
    scale: 1.1;
    box-shadow: 0 12px 24px rgba(235, 228, 13, 0.433);
}

.card-image {
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 10%;
}

.card-content {
    position: absolute;
    bottom: 0; /* 固定在底部 */
    left: 0;
    width: 100%;
    padding: 15px;
    background: rgba(0, 0, 0, 0.5); /* 半透明黑色遮罩 */
    color: white; /* 文字颜色 */
    box-sizing: border-box; /* 确保padding不影响宽度 */
    border-bottom-left-radius: 10%;
    border-bottom-right-radius: 10%;
}

.card-name {
    font-weight: bold;
    font-size: 1em;
    margin-bottom: 5px;
    color: #fff23c;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.card-cost {
    position: absolute;
    top: 5px;
    left: 5px;
    width: 25px;
    height: 25px;
    background:  rgba(255, 215, 0, 1);
    box-shadow: 0 0 15px rgba(255, 215, 0, 1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
    color: #000;
}

.card-number {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 25px;
    height: 25px;
    background:  rgba(255, 0, 0, 1);
    box-shadow: 0 0 15px rgba(255, 0, 0, 1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
    color: #000;
}

.card-description {
    color: rgba(52, 180, 240, 0.8);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

@media (max-width: 768px) {

    .card {
        min-width: 150px;
    }

}